package cn.edu.zut.hhr.enums;

public enum IddentityEnum {

    Customer(true,"customer"),Staff(false,"staff");

    private Boolean customer;
    private String iddentity;

    IddentityEnum(Boolean customer, String iddentity) {
        this.customer = customer;
        this.iddentity = iddentity;
    }

    public static IddentityEnum getByBoolean(Boolean isCustomer){
        if(isCustomer){
            return Customer;
        } else{
            return Staff;
        }
    }

    public Boolean isCustomer() {
        return customer;
    }

    public String getIddentity() {
        return iddentity;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
